home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / Libraries / usr (gcc 1.37 libs) / mac / fcntl.c < prev    next >
C/C++ Source or Header  |  1993-12-08  |  306b  |  18 lines

  1. #include <fcntl.h>
  2. #include <stdarg.h>
  3. #include <sys/types.h>
  4.  
  5. int fcntl(int fd, int cmd, ...)
  6.      {
  7.      int arg;
  8.      va_list args;
  9.      va_start(args, cmd);
  10.      arg = va_arg(args, int);
  11.      mysleep(1);
  12.      switch(cmd)
  13.          {
  14.          case F_DUPFD : return dup2(fd, next_fd(arg)); break;
  15.          }
  16.      }
  17.     
  18.